import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout'
import Dashboard from '@/views/dashboard'
import warehouseManagement from '@/views/warehouseManagement'
import newWarehouse from '@/views/newWarehouse'
import area from '@/views/area'
import newArea from '@/views/newArea'
import warehouseLocation from '@/views/warehouseLocation'
import newWarehouseLocation from '@/views/newWarehouseLocation'
import LocationView from '@/views/LocationView'
import newproductManagement from '@/views/newproductManagement'
import ItemtypeManagement from '@/views/ItemtypeManagement'

import productManagement from '@/views/productManagement'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'layout',
    component: Layout,
    redirect: '/dashboard',
    children: [
      { path: 'dashboard', component: Dashboard },
      { path: 'warehouseManagement', component: warehouseManagement },
      { path: 'newWarehouse', component: newWarehouse },
      { path: 'area', component: area },
      { path: 'warehouseLocation', component: warehouseLocation },
      { path: 'newWarehouseLocation', component: newWarehouseLocation },
      { path: 'LocationView', component: LocationView },
      { path: 'productManagement', component: productManagement },
      { path: 'newproductManagement', component: newproductManagement },
      { path: 'ItemtypeManagement', component: ItemtypeManagement },

      { path: 'newArea', component: newArea }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
